package com.yunxin.core.admin.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunxin.core.admin.domain.AdminTeam;
import com.yunxin.core.admin.service.AdminTeamService;
import com.yunxin.core.admin.mapper.AdminTeamMapper;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【sys_team(团队管理表)】的数据库操作Service实现
* @createDate 2024-05-23 19:02:08
*/
@DS("admin")
@Service
public class AdminTeamServiceImpl extends ServiceImpl<AdminTeamMapper, AdminTeam>
    implements AdminTeamService{

    @Override
    public AdminTeam getByTeamId(Integer teamId) {
        return this.getById(teamId);
    }

    @Override
    public void updateStatus(Integer teamId, Integer status) {
        LambdaUpdateWrapper<AdminTeam> updateWrapper=new LambdaUpdateWrapper<>();
        updateWrapper.eq(AdminTeam::getId,teamId).set(AdminTeam::getStatus,status);
        this.update(updateWrapper);
    }
}




